package com.youlv.yl.entity.hotel;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * <p>
 * 订单表 
 * </p>
 *
 * @author fenghe
 * @since 2022-01-25
 */
@Data
@TableName("h_hotel_order")
@ApiModel(value = "HotelOrder对象", description = "订单表 ")
public class HotelOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("订单编号")
    @TableField("no")
    private String no;

    @ApiModelProperty("总金额")
    @TableField("totalmoney")
    private Double totalmoney;

    @ApiModelProperty("支付金额")
    @TableField("freemoney")
    private Double freemoney;

    @ApiModelProperty("优惠")
    @TableField("paymoney")
    private Double paymoney;

    @ApiModelProperty("入住人姓名")
    @TableField("uid")
    private Long uid;

    @ApiModelProperty("订单状态")
    @TableField("flag")
    private Integer flag;

    @ApiModelProperty("下单时间")
    @TableField("ctime")
    private Date ctime;

    @TableField("info")
    private String info;

    @TableField("name")
    private String name;

    @TableField("phone")
    private String phone;

    public HotelOrder(String no, Double totalmoney, Double freemoney, Double paymoney, Long uid, String info, String name, String phone) {
        this.no = no;
        this.totalmoney = totalmoney;
        this.freemoney = freemoney;
        this.paymoney = paymoney;
        this.uid = uid;
        this.flag = 1;
        this.ctime = new Date();
        this.info = info;
        this.name = name;
        this.phone = phone;
    }
}
